/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TelaPerfilPaciente.java
 *
 * Created on 04/12/2011, 14:48:13
 */

package br.uff.ihc.gui;

import java.awt.Dimension;
import java.awt.Insets;
import java.awt.Toolkit;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author Adrielle
 */
public class HistoricoPaciente extends javax.swing.JFrame {

    /** Creates new form TelaPerfilPaciente */
    public HistoricoPaciente(String nome) {
        initComponents();
        Insets in = Toolkit.getDefaultToolkit().getScreenInsets(this.getGraphicsConfiguration());
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
        int width = d.width - (in.left + in.top);
        int height = d.height - (in.top + in.bottom);
        setSize(width, height);
        setLocation(in.left, in.top);
        setExtendedState(HistoricoPaciente.MAXIMIZED_BOTH);

        lbNomeUsuario.setText(nome);

//        try {
//            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (UnsupportedLookAndFeelException e) {
//        } catch (ClassNotFoundException e) {
//            // handle exception
//        } catch (InstantiationException e) {
//            // handle exception
//        } catch (IllegalAccessException e) {
//            // handle exception
//        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel5 = new javax.swing.JPanel();
        lbRotuloUsuario = new javax.swing.JLabel();
        lbNomeUsuario = new javax.swing.JLabel();
        lbData = new javax.swing.JLabel();
        pnPrincipal = new javax.swing.JPanel();
        pnNovoPaciente = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbHistorico = new javax.swing.JTable();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        lbNomePaciete = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Histórico do Paciente");

        jPanel5.setBackground(new java.awt.Color(47, 120, 47));

        lbRotuloUsuario.setFont(new java.awt.Font("Lucida Sans Typewriter", 1, 13));
        lbRotuloUsuario.setForeground(new java.awt.Color(255, 255, 255));
        lbRotuloUsuario.setText("Usuário:");

        lbNomeUsuario.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 13));
        lbNomeUsuario.setForeground(new java.awt.Color(255, 255, 255));
        lbNomeUsuario.setText("João Victor");

        lbData.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 13));
        lbData.setForeground(new java.awt.Color(255, 255, 255));
        lbData.setText("Quarta, 7 de dezembro de 2011 10:30h");

        pnPrincipal.setBackground(new java.awt.Color(255, 255, 255));
        pnPrincipal.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 51, 0), 1, true));
        pnPrincipal.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        pnNovoPaciente.setBackground(new java.awt.Color(255, 255, 255));
        pnNovoPaciente.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 51, 0), 1, true));
        pnNovoPaciente.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        tbHistorico.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Dor de cabeça e náusea", "Tratamento para Enxaqueca", "Enxaqueca", "08/08/2011"},
                {"Fraqueza", "Tomar Complexo Vitaminico", "Falta de vitamina", "10/10/2011"},
                {"Dor muscular", "Repouso", "Forçou o músculo", "20/10/2011"},
                {"Dor de cabeça", "Tratamento para Enxaqueca", "Enxaqueca", "30/11/2011"},
                {null, null, null, null}
            },
            new String [] {
                "Sintomas", "Tratamento", "Diagóstico", "Data"
            }
        ));
        jScrollPane1.setViewportView(tbHistorico);

        pnNovoPaciente.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 30, 920, 520));

        jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 51), 1, true));

        jLabel1.setFont(new java.awt.Font("Papyrus", 1, 16));
        jLabel1.setText("Paciente");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(jLabel1)
                .addContainerGap(28, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)
        );

        pnNovoPaciente.add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 30, 120, 40));

        lbNomePaciete.setText("   nome Paciente");
        lbNomePaciete.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 0), 2, true));
        pnNovoPaciente.add(lbNomePaciete, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 70, 120, 30));

        pnPrincipal.add(pnNovoPaciente, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 20, 1180, 600));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbRotuloUsuario)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbNomeUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 609, Short.MAX_VALUE)
                .addComponent(lbData, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(pnPrincipal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1329, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(18, Short.MAX_VALUE)
                .addComponent(pnPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 649, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbRotuloUsuario)
                    .addComponent(lbNomeUsuario)
                    .addComponent(lbData))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new HistoricoPaciente("").setVisible(true);
            }
        });
    }

    public void setPaciente(String nome){
        lbNomePaciete.setText(nome);
        preencheDados();
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lbData;
    private javax.swing.JLabel lbNomePaciete;
    private javax.swing.JLabel lbNomeUsuario;
    private javax.swing.JLabel lbRotuloUsuario;
    private javax.swing.JPanel pnNovoPaciente;
    private javax.swing.JPanel pnPrincipal;
    private javax.swing.JTable tbHistorico;
    // End of variables declaration//GEN-END:variables



    public void preencheDados(){



        
    }


}
